import cv2
from cv2 import VideoCapture
cv2.namedWindow('img', cv2.WINDOW_NORMAL)
img = cv2.imread("E:\\opencv\\111.png")  # 路径中不能含有中文

# 退出逻辑
while True:
    cv2.imshow('img', img)
    key = cv2.waitKey(0)  # 等待中断
    if(key & 0xFF == ord('q')):  #
        break
    elif (key & 0xFF == ord('s')):  # 保存图片
        cv2.imwrite("E:\\opencv\\112.jpg", img)
    else:
        print('other')
cv2.destroyAllWindows()

